import request from '@/utils/request'

const examine = {
  // 根据项目id获取某个项目的所有立项论证信息
  projectExpertsInfo(projectId) {
    return request.get(`/tjpt/projectExpertsInfo/getByProjectId/${projectId}`);
  },
  // 某个项目添加专家评审信息
  projectExpertsInfoUpdate(data) {
    return request.post(`/tjpt/projectExpertsInfo/update`, data);
  },
  projectExpertsInfoDetail(id) {
    return request.get(`/tjpt/projectExpertsInfo/detail/${id}`);
  },
  getReviewResult(reviewType) {
    return request.get(`/tjpt/project/getReviewResult/${reviewType}`);
  },
  addReviewResult(data) {
    return request.post(`/tjpt/projectReviewResults/add`, data);
  },
  projectExpertsInfoByReviewType(params) {
    return request.get(`/tjpt/projectExpertsInfo/getByReviewType`, {
      params
    })
  },
  projectExpertsInfoByReviewTypeForReview(params) {
    return request.get(`/tjpt/projectExpertsInfo/getByReviewTypeForReview`, {
      params
    })
  },
  projectReviewTeamGetByBusinessIdAndReviewType(params) {
    return request.get(`/tjpt/projectReviewTeam/getByBusinessIdAndReviewType`, {
      params
    })
  },
  indexList(params) {
    return request.get('/tjpt/reviewIndex/list', {params});
  },
  indexGet(id) {
    return request.get(`/tjpt/reviewIndex/detail/${id}`);
  },
  indexUpdate(data) {
    return request.post(`/tjpt/reviewIndex/update`, data);
  },
  indexAdd(data) {
    return request.post(`/tjpt/reviewIndex/add`, data);
  },
  indexDel(id) {
    return request.post(`/tjpt/reviewIndex/delete/${id}`);
  },

  // 新增评审组
  teamAdd(data) {
    return request.post(`/tjpt/reviewTeam/add`, data);
  },
  // 修改评审组
  teamUpdate(data) {
    return request.post(`/tjpt/reviewTeam/update`, data);
  },
  // 删除评审组
  teamDel(id) {
    return request.post(`/tjpt/reviewTeam/delete/${id}`);
  },
  // 获取评审组
  teamGet(id) {
    return request.get(`/tjpt/reviewTeam/detail/${id}`);
  },
  // 评审组树状列表
  teamTree(params) {
    return request.get('/tjpt/reviewTeam/tree', {params});
  },
  teamList(params) {
    return request.get('/tjpt/reviewTeam/list', {params});
  },
  // 评审组绑定项目
  teamInnovationAdd(data) {
    return request.post('/tjpt/innovationReviewTeam/add', data)
  },
  // 评审组绑定多个项目
  teamProjectAddList(data) {
    return request.post('/tjpt/projectReviewTeam/addList', data)
  },
  // 删除项目与评审组绑定关系
  teamProjectDel(id) {
    return request.post(`/tjpt/projectReviewTeam/delete/${id}`);
  },
  // 根据评审组id获取该分组下所有项目
  teamProjectGet(id) {
    return request.get(`/tjpt/projectReviewTeam/getByTeamId/${id}`);
  },
  // 查询项目列表
  teamInnovationList(params) {
    return request.get('/tjpt/innovations/waitReviewList', {params})
  },
  //
  teamProjectListByReviewType(params) {
    return request.get(`/tjpt/project/getByReviewType`, {params})
  },
  teamSmartProjectListByReviewType(params) {
    return request.get(`/tjpt/project/getByReviewTypeSmart`, {params})
  },
  // 查询专家列表
  teamExpertList(params) {
    return request.get('/tjpt/expertsReviewTeam/expertsList', {params})
  },
  teamSmartExpertList(params) {
    return request.get('/tjpt/expertsReviewTeam/smartExpertsList', {params})
  },
  // 新增单个专家与评审组绑定
  teamExpertAdd(data) {
    return request.post('/tjpt/expertsReviewTeam/add', data)
  },
  // 新增多个专家与评审组绑定
  teamExpertAddList(data) {
    return request.post('/tjpt/expertsReviewTeam/addList', data)
  },
  // 删除专家与评审组绑定关系
  teamExpertDel(id) {
    return request.post(`/tjpt/expertsReviewTeam/delete/${id}`)
  },
  // 根据评审组id获取该分组下所有专家
  teamExpertGet(id) {
    return request.get(`/tjpt/expertsReviewTeam/getByTeamId/${id}`);
  },
  // 添加专家评审信息
  teamExpertsInfoUpdate(data) {
    return request.post(`/tjpt/projectExpertsInfo/update`, data);
  },
  // 组专家评审详情
  teamExpertsInfoGet(id) {
    return request.get(`/tjpt/projectExpertsInfo/detail/${id}`);
  },
  // 初始化项目与专家评审信息
  teamInfoInit(id) {
    return request.post(`/tjpt/projectExpertsInfo/init/${id}`);
  },
  // 根据项目id获取某个项目的所有专家评审信息
  teamInfoGetByProjectId(id) {
    return request.get(`/tjpt/projectExpertsInfo/getByProjectId/${id}`);
  },
  //
  teamProjectReviewUpdate(data) {
    return request.post(`/tjpt/projectReviewTeam/update`, data);
  },
  projectReviewTeamGet(id) {
    return request.get(`/tjpt/projectReviewTeam/detail/${id}`);
  },
  reviewUserProjectAdd(data) {
    return request.post(`/tjpt/reviewUserProject/add`, data);
  },
  reviewUserProjectGetByUserId(id) {
    return request.get(`/tjpt/reviewUserProject/getByUserId/${id}`);
  },
  zjSignPdf(data) {
    return request.post(`/tjpt/projectExpertsInfo/zjSignPdf`, data);
  },
  sendMsgByTeamId(id) {
    return request.get(`/tjpt/expertsReviewTeam/sendMsgByTeamId/${id}`);
  },
  sendMsgById(id) {
    return request.get(`/tjpt/expertsReviewTeam/sendMsgById/${id}`);
  },
  // 设置评审组专家组长
  setTeamLeader(data) {
    return request.post(`/tjpt/expertsReviewTeam/setTeamLeader`, data);
  },
  // 专家评审组意见列表
  teamLeaderMyReviewList(params) {
    return request.get(`/tjpt/expertsReviewTeam/myReviewList`, {params});
  },
  // 专家评审组意见列表
  teamLeaderAllReviewList(params) {
    return request.get(`/tjpt/expertsReviewTeam/allReviewList`, {params});
  },
  // 评审意见模版
  reviewTemplate(type) {
    return request.get(`/tjpt/reviewTemplate/getUsedInfoByType/${type}`);
  },
  // 评审组长意见提交
  teamLeaderOpinion(data) {
    return request.post(`/tjpt/projectReviewTeam/collectOpinion`, data);
  },
  // 生成专家评审意见表pdf
  projectExpertsInfoPdf(data) {
    return request.post(`/tjpt/projectReviewTeam/createPdfByWindows`, data);
  },
  // 生成
  sendMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/tjpt/expertsReviewTeam/sendMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  createMsgByIdAndTemplateId(id, templateId) {
    return request.get(`/tjpt/expertsReviewTeam/createMsgByIdAndTemplateId/${id}/${templateId}`);
  },
  sendMsgByTeamIdAndTemplateId(id, templateId) {
    return request.get(`/tjpt/expertsReviewTeam/sendMsgByTeamIdAndTemplateId/${id}/${templateId}`);
  },
  // 根据项目ID组ID获取项目评审记录
  getByTeamIdAndBusinessId(id, teamId) {
    return request.get(`/tjpt/projectReviewTeam/getByTeamIdAndBusinessId/${id}/${teamId}`);
  },
  getExpertByIds(ids) {
    return request.post(`/tjpt/expertsReviewTeam/getExpertByIds`, ids);
  },
  teamExpertAddListConfirm(data){
    return request.post('/tjpt/expertsReviewTeam/addListNotVerify', data)
  },
  projectList(params) {
    return request.get('/tjpt/projectReviewTeam/list', {params})
  },
  // 待评审项目列表
  reviewListByReviewType(params) {
    return request.get('/tjpt/project/reviewListByReviewType', {params})
  },
}
export default examine;
